import React from 'react'
import classnames from 'classnames'
import PropTypes from 'prop-types'

export default function Icon({ type, className, ...rest }) {
	return (
		<svg
			className={classnames('icon', className)}
			aria-hidden="true"
			{...rest}
		>
			<use xlinkHref={`#${type}`}></use>
		</svg>
	)
}

Icon.prototype = {
	type: PropTypes.string.isRequired,
}
